import request from '@/utils/request'

// 查询领域列表
export function listRealm(query) {
  return request({
    url: '/realm/list',
    method: 'get',
    params: query
  })
}

// 查询领域详细
export function getRealm(id) {
  return request({
    url: '/realm/' + id,
    method: 'get'
  })
}

// 新增领域
export function addRealm(data) {
  return request({
    url: '/realm',
    method: 'post',
    data: data
  })
}

// 修改领域
export function updateRealm(data) {
  return request({
    url: '/realm',
    method: 'put',
    data: data
  })
}

// 删除领域
export function delRealm(id) {
  return request({
    url: '/realm/' + id,
    method: 'delete'
  })
}
